package cn.edu.cjw.APMFP.enums;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @package 权限
 * @className RoleRightEnums
 * @note TODO
 * @author wind
 * @date 2022/3/12 11:53
 */
public enum RoleRightEnums {

    TASK_MANAGE("task", "生产任务管理"),

    RES_MANAGE("resource", "成品物料管理"),

    USER_MANAGE("user", "员工账号管理"),

//    CHECK("check", "审核"),
    ;

    /**
     * 名称
     */
    private final String name;

    /**
     * 菜单标识
     */
    private final String right;

    RoleRightEnums(String name, String right) {
        this.name = name;
        this.right = right;
    }

    public String getName() {
        return name;
    }

    public String getRight() {
        return right;
    }

    /**
     * 获取权限列表
     * @return
     */
    public static List<String> getRightList(){
        return Stream.of(RoleRightEnums.values())
                .map(RoleRightEnums::getRight).collect(Collectors.toList());
    }

}
